<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>demo</title>
    <style type="text/css">
        .box1 {
            width: 200px;
            border: 2px solid #0f0;
            /*overflow: hidden;*/
        }

        .box1 .child-1 {
            /* float: left; */
            height: 100px;
            width: 100px;
            background: #fd0;
        }

        .box1 .child-2 {
            /* float: left; */
            height: 100px;
            width: 100px;
            background: #fba;
        }

        .box2 {
            width: 200px;
            height: 150px;
            border: 2px solid #00f;
            /* clear: both; */
        }

        .clearfix:after {
            content: '';
            display: table;
            clear: both;
        }

        .clearfix {
            *zoom: 1;
        }
    </style>
</head>

<body>
    <div class="box1">
        <div class="child-1">child-1</div>
        <div class="child-2">child-2</div>
    </div>
    <div class="box2"></div>
</body>

</html>